<script setup lang="ts">
interface IEmit {
  (event: 'update:visible', value: boolean): void
  (event: 'update:record', value: null): void
}

interface IProps {
  visible: boolean
  record?: null
}

defineProps<IProps>()
const emit = defineEmits<IEmit>()
// dialog确定
function handleDialogConfirm() {}

// dialog取消
function handleDialogCancel() {}

// dialog关闭
function handleDialogClose() {
  emit('update:record', null)
}
</script>

<template>
  <resource-dialog
    title="节点级联说明"
    :visible="visible"
    :width="800"
    :footer="false"
    :before-ok="handleDialogConfirm"
    :before-open="handleDialogCancel"
    :before-close="handleDialogClose"
    @update:visible="emit('update:visible', $event)"
  >
    <res-tips-bar
      text="在同一集群内，L1 节点会自动向 L2 节点进行回源；若同一集群内没有 L2 节点，L1 节点将直接向源站回源"
    />
    <div
      class="mt-6 h-230px w-full border border-color-#E8F3FF rounded-2 border-solid bg-#F9FCFF p-4"
    >
      <img
        class="h-full w-full"
        src="@/assets/images/node-cascade-desc.png"
        alt="node-cascade-desc"
      >
    </div>
  </resource-dialog>
</template>

<style scoped lang="less"></style>
